package com.ellricky.baselib.ui

import android.view.View
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
import com.andr.common.ui.fragment.BaseToolBarFragment
import com.andr.common.ui.mvp.BasePresenter
import com.ellricky.baselib.R

class ActiveDocFragment : BaseToolBarFragment<Void, BasePresenter<Void>>() {

    override fun getContentLayout(): Int {
        return R.layout.base_fragment_active_doc
    }

    override fun initUIView(root: View?) {
        super.initUIView(root)
        mTvTitle.text = "课程活动"

        val fragmentManager: FragmentManager = childFragmentManager
        val transaction: FragmentTransaction = fragmentManager.beginTransaction()
        val leftFragment = ClassActiveDocFragment.newInstance()
        transaction.add(R.id.content, leftFragment, "Recently")
        transaction.commit()
    }

    companion object {
        fun newInstance(): ActiveDocFragment {
            return ActiveDocFragment()
        }
    }
}